Map System Architecture to Simulink Modeling Environment | 您所在的位置:网站首页 › simulink library在哪 › Map System Architecture to Simulink Modeling Environment |
Map System Architecture to Simulink Modeling Environment When designing models for rapid-prototyping deployment, think about these design factors. Modeling Algorithms (Embedded Coder)Given initial state and input, a set of tasks or instructions that efficiently produce a correct result that you want.Modeling Interfaces (Embedded Coder)Mechanisms that enable algorithm components to communicate and exchange information across component boundaries.Modeling Systems (Embedded Coder)Collection of algorithm components that achieve a higher-level, domain-specific goal or result. Components often share resources.Modeling Target Platform Environments (Embedded Coder)Framework that handles scheduling of system algorithm resources and execution.Consider the following questions concerning modeling capabilities. Use the information listed with the questions as a guide as you design models. Designing a model with a specific run-time execution environment in mind can help you avoid rework and future conversion and maintenance costs. Modeling AlgorithmsArchitecture ConsiderationsModeling ConsiderationsRelated InformationWhat is the system domain?Product prerequisites (based on domains of components)Use Products and Blocks Supported for Code Generation Simulink Control Design Signal Processing Signal Generation, Manipulation, and Analysis (DSP System Toolbox) Does the system involve physical domains, such as mechanical, electrical, or hydraulic domains?Physical systemsPhysical Modeling Basic Principles of Modeling Physical Networks (Simscape) Essential Physical Modeling Techniques (Simscape) What aspects of your algorithm can you represent with blocks provided by MathWorks® products? What blocks do you need to create?Block usage, creation, and customizationUse Products and Blocks Supported for Code Generation Does the architecture include state machine components?Event-driven systemModel Finite State Machines by Using Stateflow Charts (Stateflow) Modeling InterfacesArchitecture ConsiderationsModeling ConsiderationsRelated InformationWhat data must you represent in the generated code? How do you need to represent input and output—data type, dimension, complexity? How will the data change? Data representationDefine Interfaces of Model Components Data Representation in Generated Code Where and how is data pulled into the system and pulled within the system?InputComparison of Signal Loading Techniques Where and how is data pushed within the system and out of the system? What external triggers are needed? OutputSimulation Data Inspector Organize Parameter Data into a Structure by Using Struct Storage Class (Embedded Coder) What functions do you need to define for each component? What is the prototype for each entry-point function? Functions and function callsConfigure Generated C Function Interface for Model Entry-Point Functions Do you need to export functions that are invoked by controlling logic that is outside the model?Function exportExport-Function Models Overview Generate Component Source Code for Export to External Code Base Does the system monitor signals or log data (for example, for calibration)?C API and ASAP2 data exchange interfacesExchange Data Between Generated and External Code Using C API Export ASAP2 File for Data Measurement and Calibration Do you need to replace code generated for functions or operators, for example, to optimize the code for specific hardware?Code replacementWhat Is Code Replacement? What Is Code Replacement Customization? (Embedded Coder) Is there a requirement for elaboration and future considerations?Elaboration and future considerationsDefine Interfaces of Model Components Modeling SystemsArchitecture ConsiderationsModeling ConsiderationsRelated InformationWhat is the scope of the system? Controller? External environment or plant? Test harness? How is the system partitioned into algorithm components (chunks of logic)? Which components can you represent in Simulink®? Can you design components for reuse? What is the motivation for reuse (for example, division of labor or plug-n-play)? ComponentizationDefine Interfaces of Model Components Component-Based Modeling Guidelines Compare Capabilities of Model Components Create Custom Library Extend Modeling Functionality with Custom Blocks Generate Subsystem Code as Separate Function and Files Generate Code for Model Reference Hierarchy Code Generation of Stateflow Blocks Do aspects of the system require unit testing? Is a team of people collaborating on the project? Do you need to protect intellectual property? Model referencingModel Reference Basics Compare Capabilities of Model Components Generate Code for Model Reference Hierarchy Generate Code from Atomic Subcharts Are you modeling a client-server architecture?Simulink Function and Caller blocksClient-Server Architecture Simulink Functions Overview Is relevant legacy or custom code available?External code integrationChoose an External Code Integration Workflow (Embedded Coder)Can you apply a reference architecture or reference components?Model and project templatesCreate Template from Model Create a New Project Using Templates Can you reuse functions?Function reuseGenerate Reusable Code for Subsystems Shared Across Models Generate Reusable Code from Library Subsystems Shared Across Models Generate Reentrant Code from Top Models Generate Reentrant Code from Subsystems Generate Reusable Code from Stateflow Atomic Subcharts (Embedded Coder) Do components need to share access to global data? Within the system, do state changes occur? In each case, how does the result get communicated? Are there identifier (naming) issues to consider? Shared dataLocal and Global Data Stores Data Structures in the Generated Code Storage Classes for Parameters and Signals Used in Model Blocks How Generated Code Stores Internal Signal, State, and Parameter Data Data Stores in Generated Code Customize Generated Identifier Naming Rules (Embedded Coder) Modeling Run-Time EnvironmentsArchitecture ConsiderationsModeling ConsiderationsRelated InformationWhat level of control over run-time interfacing does your application require? How much of your system can you represent in a model? Runtime interfacingExecution of Code Generated from a Model See Modeling Interfaces. Is the system partitioned into concurrent components to maximize parallelism? Which components?ConcurrencyMulticore Processor Targets Are components driven by an external clock? What clock rates do system components use? Do components use a single rate or multiple rates? Clocks and clock ratesDefine Interfaces of Model Components Are components in the system driven by clocks? What clock rates do system components use? Do components use a single rate or multiple rates? What are the priorities of system tasks and functions? Time-based schedulingAbsolute and Elapsed Time Computation Time-Based Scheduling Are components in the system driven by events (interrupts)? What are the priorities of system tasks and functions? Event-based schedulingAbsolute and Elapsed Time Computation Event-Based Scheduling Model Finite State Machines by Using Stateflow Charts (Stateflow) Does the system need to handle initialization, reset, or terminate events?Initialization, reset, terminationUsing Initialize, Reinitialize, Reset, and Terminate Functions Startup, Reset, and Shutdown Function Interfaces Is the system a single-tasking or multitasking system? Are components required to execute in real time? What are the execution order dependencies (sequencing) between components? What are the time constraints for task and function execution? Task executionExecution of Code Generated from a Model Modeling for Single-Tasking Execution Modeling for Multitasking Execution If you know the processing platform, what is it? Will the system run on a single-core or multicore processor? Is the system a distributed system? Is the processing platform hybrid or heterogeneous? Does the architecture employ symmetric or asymmetric multiprocessing? If asymmetric, how is the platform software partitioned across CPUs? Processing platformsMulticore Processor Targets |
CopyRight 2018-2019 实验室设备网 版权所有 |